<me:PDCBase x:Class="WPFExcelReport.ITXPDCXS"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:PDC="clr-namespace:WPFExcelReport;assembly=TICC_PDC"     
                    xmlns:me="clr-namespace:WPFExcelReport"              
                   Background="White"  
                    Loaded="Window_Loaded"
     >
    <me:PDCBase.Resources>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:TIMES100  x:Key="X100"/>
        <ucd:TIMES10  x:Key="X10"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <CollectionViewSource   x:Key="vwABPOS" Source="{Binding Path=SetEnv.ABPOS}" />
        <CollectionViewSource   x:Key="vwABFOLGE" Source="{Binding Path=SetEnv.ABFOLGE}" />
        <CollectionViewSource   x:Key="vwTPDC" Source="{Binding Path=SetProd.ICC_PDC}" />
        <CollectionViewSource   x:Key="vwPDC" Source="{Binding Path=SetData.ICC_PDC}" />
    </me:PDCBase.Resources>
    <TabControl Width="Auto">
        <TabItem  Header="{Binding Source={Localization:Translate Word=采集}}" Background="White" Name="tabPDC">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="1*"></RowDefinition>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                    <ColumnDefinition Width="100"></ColumnDefinition> 
                </Grid.ColumnDefinitions>
                <TextBlock Visibility="Collapsed" Grid.Column="1" Name="txtMessage"></TextBlock>
                <Grid Grid.Row="0">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="1*"></RowDefinition>
                    </Grid.RowDefinitions>
                    <StackPanel Grid.Row="0" >
                        <WrapPanel  Margin="10,0,0,0" >
                            <Grid Visibility="Collapsed">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Margin="10,0,0,0" Grid.Column="4" Text="{Binding Source={Localization:Translate Word=User:}}"></TextBlock>
                                <TextBox Grid.Column="5" Name="txtUser" Width="40">JLTV</TextBox>
                            </Grid>
                            <Grid Visibility="Collapsed">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <Button Grid.Column="0" FontSize="18" Height="30" Width="30" Margin="5,0,0,0" Name="btnPrint" Click="btnPrint_Click">
                                    <Button.Background>
                                        <ImageBrush  ImageSource="/ITXPDC;component/Image/Print.png" />
                                    </Button.Background>
                                </Button>
                                <TextBlock Grid.Column="1" Margin="5,0,0,0"  Text="{Binding Source={Localization:Translate Word=打印}}" VerticalAlignment="Center" ></TextBlock>
                            </Grid>
                        </WrapPanel>
                        <WrapPanel  Margin="10,0,0,10">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock FontSize="18" Grid.Column="0" Text="{Binding Source={Localization:Translate Word=终端号:}}"></TextBlock>
                                <TextBlock Grid.Column="1" Foreground="Red"  FontSize="18" Text="{Binding TERMNO, Mode=OneWay}" Width="80" ></TextBlock>
                            </Grid>
                            <Grid  >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=用户:}}" ></TextBlock>
                                <TextBlock Grid.Column="1"   FontSize="18"  Text="{Binding NEWUSER, Source={StaticResource ResourceKey=vwTPDC}}" Width="100" />
                            </Grid>
                            <Grid   Margin="10,0,0,0" >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=日期:}}" ></TextBlock>
                                <TextBlock Grid.Column="1"   FontSize="18"  Text="{Binding NEWDATE, Source={StaticResource ResourceKey=vwTPDC}}" Width="Auto" />
                            </Grid>
                            <Grid Margin="10,0,0,0" >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=时间:}}" ></TextBlock>
                                <TextBlock Grid.Column="1" FontSize="18"  Text="{Binding NEWTIME, Source={StaticResource ResourceKey=vwTPDC}}" Width="60" ></TextBlock>
                            </Grid>
                            <Grid  Margin="10,0,0,0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=ID:}}"></TextBlock>
                                <TextBlock Grid.Column="1" Foreground="Red"  FontSize="12" Text="{Binding ABAID, Source={StaticResource ResourceKey=vwTPDC}}" Width="Auto" ></TextBlock>
                            </Grid>
                            <Grid Margin="10,0,0,0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=重置}}"></TextBlock>
                                <Button Grid.Column="1" Height="30" Width="30" Margin="5,0,0,0"  Click="btnResetScreen_Click">
                                    <Button.Background>
                                        <ImageBrush  ImageSource="/ITXPDC;component/Image/Refresh.png" />
                                    </Button.Background>
                                </Button>
                            </Grid>
                        </WrapPanel>
                        <WrapPanel  Margin="10,0,0,10">
                            <Grid >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="200"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock  FontSize="18" Grid.Column="0" Text="{Binding Source={Localization:Translate Word=批次:}}"></TextBlock>
                                <TextBox Background="White" BorderBrush="Black"  CaretBrush="Red" SelectionBrush="Green" GotFocus="txtSPINLOT_GotFocus" FontSize="18" Grid.Column="1" Name="txtSPINLOT" CharacterCasing="Upper" KeyUp="txtSPINLOT_KeyUp" Text="{Binding JP10, Source={StaticResource ResourceKey=vwTPDC}}" Width="200" ></TextBox>
                            </Grid>
                            <Grid >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock  FontSize="18" Grid.Column="0" Text="{Binding Source={Localization:Translate Word=已收/差异/计划数量:}}"></TextBlock>
                                <TextBlock Margin="5,0,0,0" Background="White" FontSize="12" Grid.Column="1"  Foreground="Green" Text="{Binding JP07, Source={StaticResource ResourceKey=vwTPDC}}" Width="Auto" />
                                <TextBlock Margin="5,0,0,0" Background="White" FontSize="18" Grid.Column="2" Foreground="Red"   Text="{Binding JP08, Source={StaticResource ResourceKey=vwTPDC}}" Width="Auto" />
                                <TextBlock Margin="5,0,0,0" Background="White" FontSize="12" Grid.Column="3"   Text="{Binding JP09, Source={StaticResource ResourceKey=vwTPDC}}" Width="Auto" />
                            </Grid>


                        </WrapPanel>
                        <WrapPanel>
                            <Grid >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="200"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock  FontSize="18" Grid.Column="0" Text="{Binding Source={Localization:Translate Word=步骤:}}"></TextBlock>
                                <TextBox Background="LightGray" BorderBrush="Black" FontSize="18" Grid.Column="1" Name="txtABFSTEP" CharacterCasing="Upper" KeyUp="txtABFSTEP_KeyUp" Text="{Binding ABFSTEP, Source={StaticResource ResourceKey=vwTPDC}}" Width="200" ></TextBox>
                            </Grid>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" Margin="10,0,0,0"  Background="LightPink"   FontSize="18"  Text="{Binding ABFAUFKRS, Source={StaticResource ResourceKey=vwTPDC}}" Width="Auto" ></TextBlock>
                                <TextBlock Grid.Column="1" Margin="10,0,0,0"  Background="LightYellow"  FontSize="18"  Text="{Binding ABFAUFLFD, Source={StaticResource ResourceKey=vwTPDC}}" Width="Auto" ></TextBlock>
                                <TextBlock Grid.Column="2" Margin="10,0,0,0" Background="LightBlue"  FontSize="18"  Text="{Binding ABFAUFPOS, Source={StaticResource ResourceKey=vwTPDC}}" Width="Auto" ></TextBlock>
                                <TextBlock Grid.Column="3" Margin="10,0,0,0" Background="LightGreen"  FontSize="18"  Text="{Binding ABFAFOLGE, Source={StaticResource ResourceKey=vwTPDC}}" Width="Auto" ></TextBlock>
                            </Grid>
                        </WrapPanel>
                        <WrapPanel Margin="10,0,0,10">
                            <Grid  >
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"></RowDefinition>
                                    <RowDefinition Height="Auto"></RowDefinition>
                                </Grid.RowDefinitions>
                                <Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Row="0" Grid.Column="0" FontSize="18" Name="lblMachine" Text="{Binding Source={Localization:Translate Word=设备:}}" ></TextBlock>
                                    <TextBox  Grid.Row="0" Grid.Column="1"  Name="txtPDE"  SelectionBrush="Green" CharacterCasing="Upper" Background="Yellow"  CaretBrush="Red"  BorderBrush="Black" FontSize="18"   KeyUp="txtMACHINE_KeyUp" Text="{Binding AMBDEMA, Source={StaticResource ResourceKey=vwTPDC}}" Width="40" ></TextBox>
                                    <TextBox  Grid.Row="0" Background="LightGray"  Grid.Column="2" Name="txtMachineID" CharacterCasing="Upper" BorderBrush="Black" FontSize="18"   KeyUp="txtMACHINE_KeyUp" Text="{Binding MACHINEID, Source={StaticResource ResourceKey=vwTPDC}}" Width="120" ></TextBox>
                                </Grid>
                                <Grid Grid.Row="1" Grid.Column="0" >
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <TextBox Grid.Column="0" Margin="40,0,0,0"   Background="LightPink" FontSize="18" Text="{Binding AMBEZ,Converter={StaticResource ResourceKey=gb2312},Source={StaticResource ResourceKey=vwTPDC}}" Width="100" ></TextBox>
                                    <TextBlock  Visibility="{Binding IsMaster, Converter={StaticResource ResourceKey=bv}}" Grid.Column="1" Margin="10,0,0,0" Background="LightPink" FontSize="18"  Text="{Binding ABFIMNRKRS, Source={StaticResource ResourceKey=vwTPDC}}" Width="30" ></TextBlock>
                                    <TextBlock  Visibility="{Binding IsMaster, Converter={StaticResource ResourceKey=bv}}" Grid.Column="2" Margin="10,0,0,0" Background="LightYellow"   FontSize="18"  Text="{Binding ABFIMLFDNR, Source={StaticResource ResourceKey=vwTPDC}}" Width="60" ></TextBlock>
                                    <TextBlock  Visibility="{Binding IsMaster, Converter={StaticResource ResourceKey=bv}}" Grid.Column="3" Margin="10,0,0,0" Background="LightBlue"  FontSize="18"  Text="{Binding ABFIMPOS, Source={StaticResource ResourceKey=vwTPDC}}" Width="30" ></TextBlock>
                                </Grid>
                            </Grid>
                            <Grid Visibility="{Binding IsMaster, Converter={StaticResource ResourceKey=bv}}" >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=KG:}}" ></TextBlock>
                                <TextBox Grid.Column="1" Background="LightGray"  Height="30" VerticalAlignment="Top" Name="txtQty" CharacterCasing="Upper" BorderBrush="Black" FontSize="18"  Text="{Binding QTY, Source={StaticResource ResourceKey=vwTPDC}}" Width="80" ></TextBox>
                            </Grid>
                            <Grid  >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=挡车工:}}" ></TextBlock>
                                <TextBox Grid.Column="1" Background="White" Height="30" VerticalAlignment="Top" CharacterCasing="Upper" FontSize="18"  Text="{Binding PDCSTAFF, Source={StaticResource ResourceKey=vwTPDC}}" Width="120" />
                            </Grid>
                            <Grid  >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=标注:}}" ></TextBlock>
                                <TextBox Grid.Column="1" Background="White" Height="30" VerticalAlignment="Top" CharacterCasing="Upper" FontSize="18"  Text="{Binding JP14, Source={StaticResource ResourceKey=vwTPDC}}" Width="30" />
                            </Grid>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=班次:}}"></TextBlock>
                                <TextBox Grid.Column="1" Height="30" Visibility="Collapsed" VerticalAlignment="Top" CharacterCasing="Upper" Foreground="Red"  FontSize="18" Text="{Binding PDCSHIFT, Source={StaticResource ResourceKey=vwTPDC}}" Width="40" />
                                <ComboBox Grid.Column="1" Background="White" Name="cmbShift"  Height="30" Width="60" SelectionChanged="PShift_SelectionChanged" VerticalAlignment="Top" >
                                    <ComboBoxItem Content="{Binding Source={Localization:Translate Word=甲}}" Tag="1"/>
                                    <ComboBoxItem Content="{Binding Source={Localization:Translate Word=乙}}" Tag="2"/>
                                    <ComboBoxItem Content="{Binding Source={Localization:Translate Word=丙}}" Tag="3"/>
                                </ComboBox>
                            </Grid>
                        </WrapPanel>
                        <WrapPanel Margin="10,0,0,10">
                        </WrapPanel>
                        <WrapPanel  Margin="10,0,0,10">
                            <Grid Visibility="{Binding IsMaster, Converter={StaticResource ResourceKey=bv}}">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <Button Grid.Column="0"  Margin="20,0,0,0" FontSize="18"  Width="Auto" Height="Auto" Click="Start_Click" Content="{Binding Source={Localization:Translate Word=上机}}" />
                                <Button Grid.Column="1"  Margin="20,0,0,0" FontSize="18"   Width="Auto" Height="Auto" Click="End_Click" Content="{Binding Source={Localization:Translate Word=下机}}" />
                            </Grid>
                            <Grid  >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=发生日期:}}" ></TextBlock>
                                <TextBox Grid.Column="1" Background="LightGray"    FontSize="18"  Text="{Binding PDCDATE, Source={StaticResource ResourceKey=vwTPDC}}" Width="120" />
                            </Grid>
                            <Grid  >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=开始:}}" ></TextBlock>
                                <TextBox Grid.Column="1" Background="LightGray"  FontSize="18"  Text="{Binding PDCTIMES, Source={StaticResource ResourceKey=vwTPDC}}" Width="60" />
                                <TextBlock Grid.Column="2" FontSize="18" Text="{Binding Source={Localization:Translate Word=结束}}" ></TextBlock>
                                <TextBox Grid.Column="3" Background="LightGray"  FontSize="18"  Text="{Binding PDCTIMET, Source={StaticResource ResourceKey=vwTPDC}}" Width="60" />
                                <TextBlock Grid.Column="4" FontSize="18" Text="分钟数" Visibility="{Binding IsMaster, Converter={StaticResource ResourceKey=bv}}"></TextBlock>
                                <TextBox Grid.Column="5" Background="LightGray"  FontSize="18" Visibility="{Binding IsMaster, Converter={StaticResource ResourceKey=bv}}" Text="{Binding PDCTIME, Source={StaticResource ResourceKey=vwTPDC}}" Width="40" />
                            </Grid>

                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" FontSize="18" Margin="40,0,0,0" Text="{Binding Source={Localization:Translate Word=保存}}"></TextBlock>
                                <Button Grid.Column="1" Height="30" Width="30"   Name="btnOK"  Click="btnConfirmLine_Click">
                                    <Button.Background>
                                        <ImageBrush  ImageSource="/ITXPDC;component/Image/button_ok.png" />
                                    </Button.Background>
                                </Button>
                            </Grid>
                        </WrapPanel>
                    </StackPanel>
                </Grid>
                <Grid Grid.Row="1" Grid.Column="0">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="Auto"></RowDefinition>
                    </Grid.RowDefinitions>
                    <WrapPanel Grid.Row="0"  Margin="10,0,0,10">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=KM:}}" ></TextBlock>
                            <TextBox Grid.Column="1" Background="LightGray"    BorderBrush="Black" FontSize="18"  KeyUp="txtMTERS_KeyUp"  Text="{Binding JP06, Source={StaticResource ResourceKey=vwTPDC}}" Width="60" />
                        </Grid>
                        <Grid  >
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=KG:}}" ></TextBlock>
                            <TextBox Grid.Column="1" Background="LightGray"  CharacterCasing="Upper" BorderBrush="Black" FontSize="18"  Text="{Binding QTY, Source={StaticResource ResourceKey=vwTPDC}}" Width="80" ></TextBox>
                        </Grid>
                    </WrapPanel>
                    <WrapPanel Grid.Row="1"  Margin="10,0,0,10">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=号数:}}" ></TextBlock>
                            <TextBlock Grid.Column="1" FontSize="18"  Text="{Binding JP12, Source={StaticResource ResourceKey=vwTPDC}}" Width="Auto" />
                        </Grid>
                        <Grid  >
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=锭数:}}" ></TextBlock>
                            <TextBox Grid.Column="1" Background="White" Name="txtSpindles" TextChanged="calculate" CaretBrush="Red"  CharacterCasing="Upper" BorderBrush="Black" FontSize="18"  Text="{Binding JP02, Source={StaticResource ResourceKey=vwTPDC}}" Width="60" ></TextBox>
                            <TextBlock Grid.Column="2" FontSize="18"  Text="{Binding AMSTKBIS, Source={StaticResource ResourceKey=vwTPDC}}" Width="60"/>
                        </Grid>
                        <Grid  >
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="2" FontSize="18" Text="{Binding Source={Localization:Translate Word=出工:}}" ></TextBlock>
                            <TextBox Grid.Column="3" Background="White" Name="txtSPINHS"  CaretBrush="Red"  BorderBrush="Black" FontSize="18"  KeyUp="txtSPINHS_KeyUp" Text="{Binding  JP03, Source={StaticResource ResourceKey=vwTPDC}}" Width="100" ></TextBox>
                            <TextBlock Grid.Column="4" FontSize="18" Text="{Binding Source={Localization:Translate Word=入工:}}" ></TextBlock>
                            <TextBox Grid.Column="5"  Background="LightGray"   FontSize="18"  Text="{Binding AMAUFTRVON, Source={StaticResource ResourceKey=vwTPDC}}" Width="100" />
                            <TextBlock Grid.Column="6" Visibility="{Binding IsMaster, Converter={StaticResource ResourceKey=bv}}" FontSize="18" Text="最大:" ></TextBlock>
                            <TextBlock Grid.Column="7" Visibility="{Binding IsMaster, Converter={StaticResource ResourceKey=bv}}"  FontSize="18" Text="{Binding AMAUFTRBIS,Converter={StaticResource ResourceKey=X100},Source={StaticResource ResourceKey=vwTPDC}}" Width="Auto" MinWidth="100" />
                        </Grid>
                    </WrapPanel>
                    <WrapPanel Grid.Row="2"  Margin="10,0,0,10">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition> 
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" FontSize="18" Text= "落纱次数:"></TextBlock>
                            <TextBox Grid.Column="1" FontSize="18" Name="txtJP28" TextChanged="calculate" Text="{Binding JP28, Source={StaticResource ResourceKey=vwTPDC}}" Width="40" ></TextBox>
                            <TextBlock Grid.Column="2" FontSize="18" Text= "落纱姓名:"></TextBlock>
                            <TextBox Grid.Column="3" FontSize="18" Text="{Binding JP20, Source={StaticResource ResourceKey=vwTPDC}}" Width="250" ></TextBox>
                            <TextBlock Grid.Column="4" FontSize="18" Text= "折合落纱:"></TextBlock>
                            <TextBox Grid.Column="5" IsReadOnly="True" Name="txtJP15" FontSize="18" Text="{Binding JP15, Source={StaticResource ResourceKey=vwTPDC}}" Width="50" ></TextBox>
                        </Grid>
                    </WrapPanel>
                    <WrapPanel Grid.Row="3"  Margin="10,0,0,10">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                            </Grid.ColumnDefinitions> 
                            <TextBlock Grid.Column="0" FontSize="18" Text= "换纱个数:"></TextBlock>
                            <TextBox Grid.Column="1" FontSize="18" Name="txtJP24" TextChanged="calculate" Text="{Binding JP24, Source={StaticResource ResourceKey=vwTPDC}}" Width="40" ></TextBox>
                            <TextBlock Grid.Column="2" FontSize="18" Text= "铺台个数:"></TextBlock>
                            <TextBox Grid.Column="3" FontSize="18" Name="txtJP26" TextChanged="calculate" Text="{Binding JP26, Source={StaticResource ResourceKey=vwTPDC}}" Width="40" ></TextBox>
                            <TextBlock Grid.Column="4" FontSize="18" Text= "生头个数:"></TextBlock>
                            <TextBox Grid.Column="5" FontSize="18" Name="txtJP27" TextChanged="calculate" Text="{Binding JP27, Source={StaticResource ResourceKey=vwTPDC}}" Width="40" ></TextBox>
                            <TextBlock Grid.Column="6" FontSize="18" Text= "折合换纱:"></TextBlock>
                            <TextBox Grid.Column="7" IsReadOnly="True" Name="txtJP16" FontSize="18" Text="{Binding JP16, Source={StaticResource ResourceKey=vwTPDC}}" Width="50" ></TextBox>

                        </Grid>
                    </WrapPanel>
                    <WrapPanel Grid.Row="4"  Margin="10,0,0,10">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="4" FontSize="18" Text= "换纱姓名:"></TextBlock>
                            <TextBox Grid.Column="5" FontSize="18" Text="{Binding JP25, Source={StaticResource ResourceKey=vwTPDC}}" Width="420" ></TextBox>
                        </Grid>
                    </WrapPanel>
                </Grid>
                <Grid Grid.Row="2"   Grid.Column="0"  IsEnabled="False" Name="gdTPDC">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="1*"></RowDefinition>
                    </Grid.RowDefinitions>
                    <WrapPanel>
                        <Grid Visibility="Collapsed">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0"  Margin="20,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18"  Text="{Binding Source={Localization:Translate Word=删除}}"></TextBlock>
                            <Button Grid.Column="1"  Margin="20,0,0,0"  Width="40" Height="40" Click="Del_Click"  >
                                <Button.Background>
                                    <ImageBrush  ImageSource="/ITXPDC;component/Image/Delete.png" />
                                </Button.Background>
                            </Button>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Margin="10,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18"  Text="{Binding Source={Localization:Translate Word=修改时需要保存}}"></TextBlock>
                            <Button Grid.Column="2" Name="ReTry"  Margin="20,0,0,0"  Width="40" Height="40" Click="ReTry_Click"  >
                                <Button.Background>
                                    <ImageBrush  ImageSource="/ITXPDC;component/Image/Save.png" />
                                </Button.Background>
                            </Button>
                        </Grid>
                    </WrapPanel>
                    <DataGrid  Grid.Row="1"  VerticalAlignment="Top" 
                                   AutoGenerateColumns="False"
                                   EnableRowVirtualization="False"
                                   VerticalScrollBarVisibility="Auto"
                                   HorizontalScrollBarVisibility="Auto"
                                   HeadersVisibility="Column"     
                                   ItemsSource="{Binding Source={StaticResource ResourceKey=vwTPDC}}"  
                                   x:Name="dlgVKP"  
                                   RowDetailsVisibilityMode="Visible" Grid.ColumnSpan="2" Margin="0,0.2,0.2,0"
                    >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=ABAID}" Header="ID"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP10}" Header="纺批"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=PROCESSED}" Header="P"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=ABFAUFKRS}" Header=""  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=ABFAUFLFD}" Header="生产单"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=ABFAUFPOS}" Header=""  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=ABFAFOLGE}" Header="步骤号"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=ABFAGANG}" Header="加工"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=ABFBZAGANG, Converter={StaticResource ResourceKey=Trim}}" Header="描述"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=PDCDATE}" Header="操做日期"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=PDCTIME}" Header="时间"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=PDCSTAFF}" Header="挡车工"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP14}" Header="标注"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=PDCSHIFT}" Header="班次"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=QTY}" Header="数量"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP01}" Header="支书"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP02}" Header="锭数"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP03}" Header="读数"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=AMAUFTRVON}" Header="入工"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=AMAUFTRBIS}" Header="最大"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP28}" Header="落纱次数"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP15}" Header="折合落纱"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP20}" Header="落纱姓名"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP25}" Header="换纱姓名"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP24}" Header="换纱个数"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP26}" Header="铺台个数"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP27}" Header="生头个数"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP16}" Header="折合换纱"  Width="Auto" />
                        </DataGrid.Columns>
                    </DataGrid  >
                </Grid>
            </Grid>
        </TabItem>
        <TabItem Header="{Binding Source={Localization:Translate Word=管理}}" Background="White" Name="tabEdit">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="1*"></RowDefinition>
                    <RowDefinition Height="1*"></RowDefinition>
                </Grid.RowDefinitions>
                <WrapPanel Grid.Row="0"  Margin="0,0,0,0">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto">
                            </ColumnDefinition>
                            <ColumnDefinition Width="Auto">
                            </ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0"
                                    VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18"  Text="{Binding Source={Localization:Translate Word=查询}}"></TextBlock>
                        <Button Grid.Column="1" Width="20" Height="20" Margin="20,0,0,0" Click="Load_Click" >
                            <Button.Background>
                                <ImageBrush  ImageSource="/ITXPDC;component/Image/Search.png" />
                            </Button.Background>
                        </Button>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0"  Margin="20,0,0,0" HorizontalAlignment="Center"  FontSize="18"  Text="{Binding Source={Localization:Translate Word=设备}}"></TextBlock>
                        <TextBox Grid.Column="1"  Margin="20,0,0,0"  Name="txtKRS" CharacterCasing="Upper"  Width="40" Visibility="Collapsed" ></TextBox>
                        <TextBox Grid.Column="2"  Margin="20,0,0,0"  Name="txtLFD" CharacterCasing="Upper"  Width="80"  Visibility="Collapsed" ></TextBox>
                        <TextBox  Grid.Row="1" Grid.Column="1"  Name="txtQM" SelectionBrush="Green" CharacterCasing="Upper" Background="Yellow"  CaretBrush="Red" 
                                  BorderBrush="Black" FontSize="18"  Width="40" ></TextBox>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0"  Margin="20,0,0,0" HorizontalAlignment="Center"  FontSize="18"  Text="{Binding Source={Localization:Translate Word=产量日期}}"></TextBlock>
                        <DatePicker  Grid.Column="1"  Height="25" HorizontalAlignment="Left" Margin="0,5,0,0" Name="FROM_DT" VerticalAlignment="Top" Panel.ZIndex="4"
                                SelectedDateChanged ="FROM_DT_SelectedDateChanged" Width="125" />
                        <Label Content="{Binding Source={Localization:Translate Word=到}}" Grid.Column="2" Height="28" HorizontalAlignment="Left" Margin="5,5,0,0"  VerticalAlignment="Top" Width="33" FontSize="16" />
                        <DatePicker  Grid.Column="3"  Height="25" HorizontalAlignment="Left" Margin="0,5,0,0" Name="END_DT" VerticalAlignment="Top" Panel.ZIndex="5"
                                SelectedDateChanged ="END_DT_SelectedDateChanged" Width="122" />
                    </Grid>
                    <WrapPanel Visibility="Collapsed">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0"  Margin="20,0,0,0" 
                                    VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18"   Text="{Binding Source={Localization:Translate Word=品种}}"></TextBlock>
                            <TextBox Grid.Column="1"  Margin="20,0,0,0"  Name="txtART" CharacterCasing="Upper"  Width="100" Height="30"></TextBox>

                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <Button Grid.Column="0"  Margin="20,0,0,0"  Width="20" Height="20" Click="btnFilter_Click">
                                <Button.Background>
                                    <ImageBrush  ImageSource="/ITXPDC;component/Image/Search.png" />
                                </Button.Background>
                            </Button>
                            <Button Grid.Column="1"   Click="btnFilterClear_Click">Clear</Button>
                        </Grid>

                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto">
                                </ColumnDefinition>
                                <ColumnDefinition Width="Auto">
                                </ColumnDefinition>
                                <ColumnDefinition Width="Auto">
                                </ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0"  Margin="20,0,0,0" 
                                    VerticalAlignment="Center" HorizontalAlignment="Center"   Text="{Binding Source={Localization:Translate Word=来单日期}}"></TextBlock>
                            <ComboBox Grid.Column="1"  IsEditable="True" Name="cmbNDate" Width="100" Height="30"></ComboBox>
                        </Grid>
                        <Button FontSize="18" Height="20" Width="20" Margin="5,0,0,0"  Click="btnPrint_Click">
                            <Button.Background>
                                <ImageBrush  ImageSource="/ITXPDC;component/Image/Print.png" />
                            </Button.Background>
                        </Button>
                        <TextBlock Margin="5,0,0,0"  Text="{Binding Source={Localization:Translate Word=打印}}" VerticalAlignment="Center" ></TextBlock>
                    </WrapPanel>
                </WrapPanel>
                <DataGrid Grid.Row="1"
                    VerticalAlignment="Top"  
                                   AutoGenerateColumns="False"
                                   EnableRowVirtualization="False"
                                   VerticalScrollBarVisibility="Auto"
                                   HorizontalScrollBarVisibility="Auto"
                                   HeadersVisibility="Column"                 
                                   HorizontalAlignment="Stretch"   
                          Name="dlgNOrders"
                                   ItemsSource="{Binding Source={StaticResource ResourceKey=vwPDC}}"                                 
                                   Margin="0,0,0,0"             
                                   RowDetailsVisibilityMode="Visible" 
                    >
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=ABAID}" Header="ID"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=PROCESSED}" Header="P"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=AMBDEMA}" Header="机台号"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP10}" Header="批号"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=ABFBZAGANG, Converter={StaticResource ResourceKey=Trim}}" Header="加工"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=PDCDATE}" Header="产量日期"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP14}" Header="标注"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=PDCSTAFF}" Header="挡车工"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=PDCSHIFT}" Header="班次"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=QTY}" Header="数量"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP01}" Header="支数"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP02}" Header="锭数"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=AMAUFTRVON}" Header="进工"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP03}" Header="出工"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP28}" Header="落纱次数"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP15}" Header="折合落纱"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP20}" Header="落纱姓名"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP25}" Header="换纱姓名"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP24}" Header="换纱个数"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP26}" Header="铺台个数"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP27}" Header="生头个数"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP16}" Header="折合换纱"  Width="Auto" />
                    </DataGrid.Columns>
                </DataGrid  >
                <Grid Grid.Row="2">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="1*"></RowDefinition>
                    </Grid.RowDefinitions>
                    <WrapPanel Grid.Row="0">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto">
                                </ColumnDefinition>
                                <ColumnDefinition Width="54">
                                </ColumnDefinition>
                                <ColumnDefinition Width="6"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0"  Margin="20,12,0,12" 
                                    VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18"   Text="{Binding Source={Localization:Translate Word=编辑}}"></TextBlock>
                            <Button Grid.Column="1"  Margin="20,0,0,0"  Width="40" Height="40" Click="Edit_Click" Name="btnEDIT" Grid.ColumnSpan="2" >
                                <Button.Background>
                                    <ImageBrush  ImageSource="/ITXPDC;component/Image/Open.png" />
                                </Button.Background>
                            </Button>
                        </Grid>
                    </WrapPanel>
                    <DataGrid  Grid.Row="1"   VerticalAlignment="Top"  
                                   AutoGenerateColumns="False"
                                   EnableRowVirtualization="False"
                                   VerticalScrollBarVisibility="Auto"
                                   HorizontalScrollBarVisibility="Auto"
                                   HeadersVisibility="Column"     
                                   ItemsSource="{Binding Source={StaticResource ResourceKey=vwTPDC}}"    
                                   RowDetailsVisibilityMode="Visible"
                    >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=ABAID}" Header="ID"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=PROCESSED}" Header="P"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=AMBDEMA}" Header="机台号"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP10}" Header="批号"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=ABFBZAGANG, Converter={StaticResource ResourceKey=Trim}}" Header="加工"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=PDCDATE}" Header="产量日期"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP14}" Header="标注"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=PDCSTAFF}" Header="挡车工"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=PDCSHIFT}" Header="班次"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=QTY}" Header="数量"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP01}" Header="支数"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP02}" Header="锭数"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=AMAUFTRVON}" Header="进工"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP03}" Header="出工"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP28}" Header="落纱次数"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP15}" Header="折合落纱"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP20}" Header="落纱姓名"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP25}" Header="换纱姓名"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP24}" Header="换纱个数"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP26}" Header="铺台个数"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP27}" Header="生头个数"  Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=JP16}" Header="折合换纱"  Width="Auto" />
                        </DataGrid.Columns>
                    </DataGrid  >
                </Grid>
            </Grid>
        </TabItem>
        <TabItem Header="{Binding Source={Localization:Translate Word=报表}}" Background="White" Name="tabReport">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="1*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="1*"></RowDefinition>
                </Grid.RowDefinitions>
                <WrapPanel Grid.Row="0" Grid.Column="0" Margin="0,0,0,0">
                    <TextBlock Margin="10,0,0,0" HorizontalAlignment="Center" Height="21" FontSize="18"  Text="{Binding Source={Localization:Translate Word=批号}}" Width="40"></TextBlock>
                    <TextBox  Margin="5,0,0,0" Text="" Name="txtLOT" FontSize="18" CharacterCasing="Upper" Width="116" MaxLength="10" Height="31" Panel.ZIndex="1"></TextBox>
                    <TextBlock  Margin="10,0,0,0" HorizontalAlignment="Center"  FontSize="18"  Text="{Binding Source={Localization:Translate Word=设备}}" Height="20"></TextBlock>
                    <TextBox Margin="5,0,0,0" Text="" Name="txtBDE" FontSize="18" CharacterCasing="Upper"  Width="56" MaxLength="5" Panel.ZIndex="2"></TextBox>
                    <TextBlock  Margin="10,0,0,0" HorizontalAlignment="Center"  FontSize="18"  Text="{Binding Source={Localization:Translate Word=档车工}}" Height="20"></TextBlock>
                    <TextBox Margin="5,0,0,0" Text="" Name="txtSTAFF" FontSize="18" CharacterCasing="Upper"  Width="92" MaxLength="8" Panel.ZIndex="3"></TextBox>

                    <TextBlock  Margin="10,0,0,0" HorizontalAlignment="Center"  FontSize="18"  Text="{Binding Source={Localization:Translate Word=产量日期}}" Height="19"></TextBlock>
                    <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,5,0,0" Name="FROM_DATE" VerticalAlignment="Top" Panel.ZIndex="4"
                                SelectedDateChanged ="FROM_DATE_SelectedDateChanged" Width="125" />
                    <Label Content="{Binding Source={Localization:Translate Word=到}}" Height="28" HorizontalAlignment="Left" Margin="5,5,0,0" Name="label2" VerticalAlignment="Top" Width="33" FontSize="16" />
                    <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,5,0,0" Name="END_DATE" VerticalAlignment="Top" Panel.ZIndex="5"
                                SelectedDateChanged ="END_DATE_SelectedDateChanged" Width="122" />
                    <Button  Margin="10,0,0,0"  Width="35" Height="31" Name="btnQuery"  Click="btnQuery_Click" Panel.ZIndex="6">
                        <Button.Background>
                            <ImageBrush  ImageSource="/ITXPDC;component/Image/Search.png" />
                        </Button.Background>
                    </Button>
                    <Button FontSize="18" Height="31" Width="38" Margin="10,0,0,0" Name="btnEXCEL"  Click="btnEXCEL_Click" Panel.ZIndex="7">
                        <Button.Background>
                            <ImageBrush  ImageSource="/ITXPDC;component/Image/excel.jpg" />
                        </Button.Background>
                    </Button>
                </WrapPanel> 
                <DataGrid Grid.Row="1" Grid.Column="0"
                    VerticalAlignment="Top"  
                                   AutoGenerateColumns="False"
                                   EnableRowVirtualization="False"
                                   VerticalScrollBarVisibility="Auto"
                                   HorizontalScrollBarVisibility="Auto"
                                   HeadersVisibility="Column"                 
                                   HorizontalAlignment="Stretch"   
                                   Name="dlgOrder"
                                   ItemsSource="{Binding}" RowDetailsVisibilityMode="Visible" Grid.ColumnSpan="2" Margin="0,0,0,0" 
                    >
                    <DataGrid.Columns>
                        <!--PDCDATE	JP10	ABFAUFKRS	ABFAUFLFD	ABFAUFPOS	ABPART	ABPFARBE	
                        AMBDEMA	PDCSTAFF	PDCSHIFT	QTY	AMAUFTRVON	JP03	JP02	JP06	JP12-->
                        <DataGridTextColumn Binding="{Binding Path=PDCDATE}" Header="产量日期"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP10}" Header="批号"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP14}" Header="标注"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=ABFAUFKRS}" Header=""  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=ABFAUFLFD}" Header="生产单"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=ABFAUFPOS}" Header=""  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=ABPART}" Header="品种"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=ABPFARBE}" Header="色号"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=AMBDEMA}" Header="机台"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=PDCSTAFF}" Header="档车工"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=PDCSHIFT}" Header="班次"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=QTY}" Header="数量"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=AMAUFTRVON}" Header="入工数"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP03}" Header="出工数"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP02}" Header="实开锭数"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP06}" Header="KM"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP12}" Header="号数"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP28}" Header="落纱次数"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP15}" Header="折合落纱"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP20}" Header="落纱姓名"  Width="Auto" /> 
                        <DataGridTextColumn Binding="{Binding Path=JP25}" Header="换纱姓名"  Width="Auto" /> 
                        <DataGridTextColumn Binding="{Binding Path=JP24}" Header="换纱个数"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP26}" Header="铺台个数"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP27}" Header="生头个数"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=JP16}" Header="折合换纱"  Width="Auto" />
                    </DataGrid.Columns>
                </DataGrid  >
            </Grid>
        </TabItem>
        <TabItem Header="{Binding Source={Localization:Translate Word=统计}}" Background="White" Name="tabSummary">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="1*"></RowDefinition>
                </Grid.RowDefinitions>
                <WrapPanel Grid.Row="0">
                    <TextBlock  Margin="10,0,0,0" HorizontalAlignment="Center"  FontSize="18"  Text="{Binding Source={Localization:Translate Word=产量日期}}" Height="19"></TextBlock>
                    <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,5,0,0" Name="FROM_DAT" VerticalAlignment="Top" Panel.ZIndex="4"
                                SelectedDateChanged ="FROM_DAT_SelectedDateChanged" Width="125" />
                    <Label Content="{Binding Source={Localization:Translate Word=到}}" Height="28" HorizontalAlignment="Left" Margin="5,5,0,0" Name="label3" VerticalAlignment="Top" Width="33" FontSize="16" />
                    <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,5,0,0" Name="END_DAT" VerticalAlignment="Top" Panel.ZIndex="5"
                                SelectedDateChanged ="END_DAT_SelectedDateChanged" Width="122" />
                    <Button  Margin="10,0,0,0"  Width="35" Height="31" Name="btnSum"  Click="btnSum_Click" Panel.ZIndex="6">
                        <Button.Background>
                            <ImageBrush  ImageSource="/ITXPDC;component/Image/Search.png" />
                        </Button.Background>
                    </Button>
                    <Button FontSize="18" Height="31" Width="38" Margin="10,0,0,0" Name="btnExport"  Click="btnExport_Click" Panel.ZIndex="7">
                        <Button.Background>
                            <ImageBrush  ImageSource="/ITXPDC;component/Image/excel.jpg" />
                        </Button.Background>
                    </Button>
                </WrapPanel>
                <DataGrid Grid.Row="1"
                    VerticalAlignment="Top"  
                                   AutoGenerateColumns="False"
                                   EnableRowVirtualization="False"
                                   VerticalScrollBarVisibility="Auto"
                                   HorizontalScrollBarVisibility="Auto"
                                   HeadersVisibility="Column"                 
                                   HorizontalAlignment="Stretch"   
                                   Name="dlgSummary"
                                   ItemsSource="{Binding}" RowDetailsVisibilityMode="Visible" 
                    >
                    <DataGrid.Columns>
                        <!--YARN	QTY	COUNT-->
                        <DataGridTextColumn Binding="{Binding Path=YARN}" Header="纱型纱支"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=QTY}" Header="数量"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=COUNT}" Header="实际支数"  Width="Auto" />
                    </DataGrid.Columns>
                </DataGrid  >
            </Grid>
        </TabItem>
        <TabItem Header="{Binding Source={Localization:Translate Word=报表N}}" Background="White"  >
            <PDC:TYGRPDCBB/>
        </TabItem>
        <TabItem Header="{Binding Source={Localization:Translate Word=统计N}}" Background="White"  >
            <PDC:TYGRQMPDC/>
          </TabItem> 
    </TabControl>
</me:PDCBase>
